<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>Context Menu on DataGrid - jQuery EasyUI Demo</title>
    <link rel="stylesheet" type="text/css" href="easyui-1.4.4/themes/default/easyui.css">
    <link rel="stylesheet" type="text/css" href="easyui-1.4.4/themes/icon.css">
    <script src="easyui-1.4.4/jquery.min.js"></script>
    <script src="easyui-1.4.4/jquery.easyui.min.js"></script>
</head>
<body>
<h2>Context Menu on DataGrid</h2>
<p>Right click on the header of DataGrid to display context menu.</p>
<div style="margin:20px 0;"></div>
<table id="Bus_Data_List"></table>
<script type="text/javascript">
    $(function () {
        $("#Bus_Data_List").datagrid({
            fit: true,
            striped: true,
            border: false,
            pagination: true,
            singleSelect: true,
            sortName: 'id',
            sortOrder: 'asc',
            pageSize: 20,
            pageList: [10, 20, 50],
            url: '/cms/index.php?m=Bus&c=Bus&a=index',
            columns: [[
                {field: 'id', title: '自编号'},
                {field: 'line_no', title: '线路号'}, {
                    field: 'state_time',
                    title: '状态修改时间'
                }, {field: 'birthday', title: '车辆年限'}, {field: 'description', title: '备注'}, {
                    field: 'state',
                    title: '状态'
                }, {field: 'brand', title: '车辆品牌'}, {field: 'station', title: '公交场站'}, {
                    field: 'operate',
                    title: '操作'
                },]]
        });
    })
</script>
</body>
</html>